package com.jwaoo.mobile.view.register.model;

import android.content.Context;

import com.dx.as.common.ILoadListener;
import com.jwaoo.mobile.http.HttpHelper;

import java.util.Map;

import http.IHttpListener;

/**
 * Created by jwaoo on 2017/10/16.
 */

public class RegisterModel extends IHttpListener {

    public RegisterModel(Context context, ILoadListener loadListener) {
        super(context, loadListener);
    }

    @Override
    public void onResponse(Object response, int flg) {
        loadListener.onResponse(response,flg);
    }

    @Override
    public void onFailure(Throwable t) {
        loadListener.onFailure(t);
    }

    public void doRegister(Map map){
        HttpHelper.doRegister(map,this);
    }

    public void doSendEmail(Map map) {
        HttpHelper.doSendEmail(map,this);
    }
    @Override
    public void onFilure(int code, String errorMsg) {
        loadListener.onFailure(code,errorMsg);
    }
}
